home *** CD-ROM | disk | FTP | other *** search
- 10 poke 53281,0:poke 53280,12
- 20 poke780,peek(55):poke781,peek(56)
- 30 poke55,peek(45):poke56,peek(46)+8:clr:ol=peek(780):oh=peek(781)
- 40 mt=peek(55)+256*peek(56)+257:mb=peek(43)+256*peek(44)-2
- 50 pr$="("+str$(mb)+"-"+str$(mt)+")"
- 60 dimc%(255)
- 70 print"[147]"tab(0)" batch processor setup program "
- 80 print"[156] addresses can be in decimal or hex."
- 90 printtab(8)"add '$' to specify hex."
- 100 print"[152]start address for main patch and data:"
- 110 print"(64 bytes + data bytes)"
- 120 print"default = $a000:40960[146] ";
- 130 df=40960:gosub1230:s1=a
- 140 print"maximum end address for main patch"
- 150 print"and data:"
- 160 print"default = $bfff(49151)[146] ";
- 170 df=49151:gosub1230:e1=a
- 180 if (e1<mb) or (s1>mt) then 200
- 190 print"patch can't go on basic init. program":printpr$:goto100
- 200 if e1 > 53247 then print "patch can't be under kernal or i/o":goto100
- 210 if s1+64>=e1thenprint"impossible -- need at least 64 bytes!!":goto100
- 220 print"start address for boot (35 bytes):"
- 230 print"default = $033c:828[146] ";
- 240 df=828:gosub1230:s2=a
- 250 if(s2+34<mb)or(s2>mt)then270
- 260 print"boot can't go on basic init. program":printpr$:goto220
- 270 if(s2<40959-35) or (s2>49151 and s2<53247-35) then 290
- 280 print"boot cannot be under rom or i/o":goto220
- 290 p2% = not((s1<40960 and e1<40960) or (s1>=49152 and e1>=49152))
- 300 if not(p2%) then 390
- 310 print"start address for small patch"
- 320 print"(21 bytes):"
- 330 print"default = boot+35 =";s2+35;"[146]";
- 340 df=s2+35:gosub1230:s3=a
- 350 if (s3+20<mb) or (s3>mt) then 370
- 360 print"small patch can't go on basic init prog":printpr$:goto310
- 370 if not((s3>40959 and s3<49151+21)or(s3>53247))then390
- 380 print"small patch can't be under roms or i/o":goto310
- 390 print"free zero page space (2 bytes):"
- 400 print"default = $be:190[146] ";
- 410 df=190:gosub1230:zp=a
- 420 ifzp>254orzp<2thenprint"not a usable zero page address":goto390
- 430 print"[147]installing patches..."
- 440 de$="error in data statements "
- 450 ck=0:fori=0to63:readb:ck=ck+b:pokes1+i,b:next
- 460 readz:ifz<>-1orck<>4956thenprintde$;"5015-5110":goto1670
- 470 ck=0:fori=0to34:readb:ck=ck+b:pokes2+i,b:next
- 480 readz:ifz<>-1orck<>2266thenprintde$;"5130-5170":goto1670
- 490 if not(p2%) then fori=0to21:readz:next: goto 570
- 500 ck=0:fori=0to20:readb:ck=ck+b:pokes3+i,b:next
- 510 readz:ifz<>-1orck<>1079thenprintde$;"5190-5220":goto1670
- 520 t=s3+20:th=int(t/256):tl=t-256*th
- 530 poke s3+3,tl :poke s3+4,th
- 540 poke s3+13,tl:poke s3+14,th
- 550 th=int(s1/256):tl=s1-256*th
- 560 poke s3+10,tl:poke s3+11,th
- 570 if p2% then t=s3+18
- 580 if not(p2%) then t=s1+60
- 590 u=t+1
- 600 th=int(t/256):tl=t-256*th
- 610 uh=int(u/256):ul=u-256*uh
- 620 poke s1+34,tl:poke s1+35,th
- 630 poke s1+40,ul:poke s1+41,uh
- 640 poke s2+4,tl :poke s2+5,th
- 650 poke s2+10,ul:poke s2+11,uh
- 660 if p2% then t=s3
- 670 if not(p2%) then t=s1
- 680 th=int(t/256):tl=t-256*th
- 690 poke s2+14,tl
- 700 poke s2+19,th
- 710 t=s1+63
- 720 th=int(t/256):tl=t-256*th
- 730 poke s2+24,tl:poke s2+29,th
- 740 t=s1+62
- 750 u=t+1
- 760 th=int(t/256):tl=t-256*th
- 770 uh=int(u/256):ul=u-256*uh
- 780 poke s2+26,tl:poke s2+27,th
- 790 poke s2+31,ul:poke s2+32,uh
- 800 poke s1+5,tl :poke s1+6,th
- 810 poke s1+10,ul:poke s1+11,uh
- 820 poke s1+13,tl:poke s1+14,th
- 830 poke s1+21,ul:poke s1+22,uh
- 840 if p2% then poke s1+59,96
- 850 if not(p2%) then poke s1+59,76
- 860 poke s1+16,zp:poke s1+24,zp+1
- 870 poke s1+55,zp
- 880 print "[147]name of command file";
- 890 input cf$:ifcf$=""then880
- 900 print"file type:";
- 910 print"seq, prg, or usr (s, p, or u)"
- 920 t$="s":input"default = s[146] ";t$
- 930 ift$<>"s"andt$<>"p"andt$<>"u"thenprint"type s, p, or u":goto920
- 940 cf$=cf$+","+t$+",r"
- 950 print"file format:"
- 960 print"screen code or commodore ascii (s or a)"
- 970 f$="a":input"default = a[146] ";f$
- 980 iff$<>"s"andf$<>"a"thenprint"type s or a":goto970
- 990 print "[147]reading control file..."
- 1000 fori=0to255:c%(i)=i:next:iff$="a"then1060
- 1010 fori=0to30:c%(i)=i+64:next
- 1020 fori=64to95:c%(i)=i+32:next:::fori=96to127:c%(i)=i+104:next
- 1030 fori=128to154:c%(i)=i-128:next
- 1040 c%(177)=133:c%(178)=137:c%(179)=134:c%(180)=138
- 1050 c%(181)=135:c%(182)=139:c%(183)=136:c%(184)=140::c%(31)=13
- 1060 open 15,8,15,"i0"
- 1070 open2,8,2,cf$
- 1080 input#15,e,e$,t,s:ife>0thenclose2:close15
- 1090 ife>0thenprint"disk error:[146]";e;e$;t;s:fori=1to3500:next:goto880
- 1100 ml=mt-256:ck=0:fori=mltoml+89:readb:ck=ck+b:pokei,b:next
- 1110 readz:ifz<>-1orck<>10435thenprintde$;"5310-5450":goto1670
- 1120 d=s1+64:iff$="a"then1140
- 1130 get#2,a$,b$:ifa$<>""orb$<>chr$(37)thenclose2:open2,8,2,cf$
- 1140 th=int(d/256):tl=d-256*th:pokeml+1,tl:pokeml+5,th
- 1150 th=int(e1/256):tl=e1-256*th:pokeml+63,tl:pokeml+69,th
- 1160 th=int(ml/256):tl=ml-256*th:poke785,tl:poke786,th
- 1170 t=usr(0)+1:ss=st:close2:close15
- 1180 ifss=0then print"[147][154]data doesn't fit.[152]":(NULL)t9000
- 1190 if t<0 then t=t+65536
- 1200 th=int(t/256):tl=t-th*256
- 1210 poke s1+18,tl:poke s1+29,th
- 1220 print "done -- sys";s2;"[157][146] to boot.":goto1680
- 1230 a=0:a$="":input a$
- 1240 ifa$=""thena=df:return
- 1250 if left$(a$,1) <> "$" and val(a$) > 0 then a=val(a$):return
- 1260 if left$(a$,1) <> "$" then 1230
- 1270 fori=2tolen(a$)
- 1280 c$=mid$(a$,i,1):ifc$<="9"andc$>="0"thena=a+val(c$)*16^(len(a$)-i):goto1300
- 1290 a=a+(asc(c$)-55)*16^(len(a$)-i)
- 1300 nexti:ifa=0then1230
- 1310 return
- 1320 data 165,198,208,55,238,0,0
- 1330 data 208,3,238,0,0,173,0,0
- 1340 data 133,0,201,0,8
- 1350 data 173,0,0,133,0,40
- 1360 data 208,21,201,0,208,17
- 1370 data 120,173,0,0,141,20,3
- 1380 data 173,0,0,141,21,3,88
- 1390 data 24,144,10,160,1
- 1400 data 132,198,136,177,0
- 1410 data 141,119,2,0,0,0
- 1420 data 0,0,-1
- 1430 data 173,20,3,141,0,0,173,21,3
- 1440 data 141,0,0,120,169,0
- 1450 data 141,20,3,169,0,141,21,3
- 1460 data 169,0,141,0,0,169,0
- 1470 data 141,0,0,88,96,-1
- 1480 data 165,1,141,0,0,169,54
- 1490 data 133,1,32,0,0,173,0,0
- 1500 data 133,1,76,0,0
- 1510 data 0,-1
- 1520 data 169,0,133,99,169,0
- 1530 data 133,100,24,165,47,105,8
- 1540 data 133,97,165,48,105,0
- 1550 data 133,98,162,2,32,198,255
- 1560 data 32,228,255,10,133,101
- 1570 data 169,0,42,133,102,24
- 1580 data 165,97,101,101,133,101
- 1590 data 165,98,101,102,133,102
- 1600 data 160,0,177,101,145,99
- 1610 data 165,144,208,20,165,99
- 1620 data 201,0,208,6,165,100
- 1630 data 201,0,240,8,230,99
- 1640 data 208,206,230,100,208,202
- 1650 data 32,204,255,164,99,165,100
- 1660 data 108,5,0,-1
- 1670 poke55,ol:poke56,oh:clr:end
- 1680 poke55,ol:poke56,oh:new
-